package com.zhilianbao.leyaogo.http.client;

import android.content.Context;

import com.zhilianbao.okhttputils.OkHttpUtils;
import com.zhilianbao.okhttputils.callback.Callback;
import com.zhilianbao.okhttputils.model.HttpParams;

/**
 * ClassName: UploadClient <br>
 * Description: 上传 Client<br>
 * Author: Cyarie <br>
 * Created: 2016/11/23 17:18 <br>
 * Update Time：<br>
 * Update Description：<br>
 */
public class UploadClient {

    /**
     * Post请求
     * 用于文件上传
     *
     * @param context
     * @param url
     * @param httpParams
     * @param callback
     */
    public static void post(Context context, String url, HttpParams httpParams, Callback callback) {
        OkHttpUtils.post(url).params(httpParams).isMultipart(true).isPostForm(true).tag(context).execute(callback);
    }
}
